/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pontos;

/**
 *
 * @author Raphael
 */
import javax.swing.JOptionPane;  
import java.math.*;  
  
public class Pontos {  
      
    public static void main(String[] args)  
  
    {  
          
  
        String str = JOptionPane.showInputDialog("digite x1");  
        double x1 = Double.parseDouble(str);  
  
        str = JOptionPane.showInputDialog("Digite y1");  
        double y1 = Double.parseDouble(str);  
  
        str = JOptionPane.showInputDialog("Digite x2");  
        double x2 = Double.parseDouble(str);  
  
        str = JOptionPane.showInputDialog("Digite y2");  
        double y2 = Double.parseDouble(str);  
  
        double d = Math.sqrt((x2 - x1) + (y2 - y1));  
        
        System.out.println("o tamanho da reta é:"+ d);  
        
        
  
  
    }  
} 
